Add gpBackMan — a backup management utility for Apache Cloudberry (Incubating) Backup.#79
Add gpBackMan — a backup management utility for Apache Cloudberry (Incubating) Backup.#79woblerr wants to merge 11 commits intoapache:mainfrom
Conversation
Integrate gpbackman (https://github.com/woblerr/gpbackman) — a CLI utility for managing gpbackup backups — into the cloudberry-backup repo. YAML functionality (history-migrate, converters, utils_file) is not ported. Key changes: - Add gpbackman.go entry point with //go:build gpbackman tag - Create gpbackman/cmd/, gpbackman/gpbckpconfig/, gpbackman/textmsg/ - Migrate imports: greenplum-db/* → apache/cloudberry-* - Remove converter layer — use history.BackupConfig directly - Extract 11 BackupConfig methods into standalone functions (helpers.go) - Replace go-pretty/v6 with olekukonko/tablewriter - Add gpbackman to all Makefile targets (build/install/clean/package) - Version via ldflags: -X gpbackman/cmd.version - Rewrite unit tests from stdlib testing to Ginkgo/Gomega CLI subcommands: backup-info, backup-delete, backup-clean, history-clean, report-info.
- Replace searchFilter() with utils.Exists() in gpbckpconfig/helpers.go - Remove searchFilter() from gpbckpconfig/utils.go and its test - Replace getCurrentTimestamp() with history.CurrentTimestamp() in cmd/backup_delete.go - Remove getCurrentTimestamp() from cmd/wrappers.go and its test
Also add vscode to gitignore.
|
Hi @woblerr thanks for your great work! A license question needs your confirmation here: do you still want to keep these files under the original MIT license, or adopt the Apache license? (MIT files are allowed to be introduced in ASF projects.) Once you confirm, I can help with it. |
|
@tuhaihe The original gpbackman project will remain under MIT. Is it acceptable for you? |
Yap, sounds good. I think it's perfectly fine. Regarding these newly introduced files, would you be able to add the standard Apache License Header to them without affecting program execution to follow the ASF rules?
If it's not convenient for you to handle, I can add them as well. |
|
Hi @robertmu, could you help review this PR when you're available? Thanks! |
This PR adds gpBackMan, a utility for managing backups created by gpbackup. The tool provides an open-source alternative to the proprietary
gpbackup_manager, addressing the need discussed in apache/cloudberry#1555gpBackMan is based on the original gpbackman project (woblerr/gpbackman#39) and has been adapted for integration into the cloudberry-backup repository.
Motivation
The Apache Cloudberry community has expressed interest in having a backup management tool similar to gpbackup_manager, which is proprietary and not available in the open-source offering. gpBackMan fills this gap by providing essential backup management capabilities that work with the
gpbackup_history.dbSQLite history database format.Features
gpBackMan provides the following functionality:
backup-info— display information about existing backups;report-info— display the backup report for a specific backup;backup-delete— delete a specific existing backup from local storage or using storage plugins;backup-clean— delete all existing backups older than (or newer than) a specified time condition;history-clean— clean deleted backups from the history database;Both local storage and storage plugin-based backups are supported.
Related links
Discussion: apache/cloudberry#1555 — Availability of GPBackup_Manager in CB2.0
Issue: woblerr/gpbackman#39 — Support for Apache Cloudberry
Original project: gpbackman